/*
****************************************************************************************
** braif: LCD驱动、简单GUI
**
** Author: xiongjinqi
** Date:  2022/11/30
** History: 
        2022/11/30: 初始版本
****************************************************************************************
*/
#include "main.h"
#include "bsp_lcd.h" /* 板载lcd硬件功能 */
#include "dev_lcd.h" /* LCD对上统一接口 */

/* Functions defines *******************************************************/

/* variables *******************************************************/


/* Functions defines *******************************************************/
s32 drv_ili9341_init(DevLcd *lcd)
{
    bsplcd_init();
}

s32 drv_ili9341_drawpoint(DevLcd *lcd, u16 x, u16 y, u16 color)
{
    
}

s32 drv_ili9341_color_fill(DevLcd *lcd, u16 sx,u16 ex,u16 sy,u16 ey, u16 color)
{

}

s32 drv_ili9341_fill(DevLcd *lcd, u16 sx,u16 ex,u16 sy,u16 ey,u16 *color)
{

}

s32 drv_ili9341_display_onoff(DevLcd *lcd, u8 sta)
{

}
/*
    param[IN]:
            lcd : lcd句柄
            sx: x轴起始地址
            sy: y轴起始地址
            ex: x轴结束地址
            ey: y轴结束地址
*/
s32 drv_ili9341_prepare_display(DevLcd *lcd, u16 sx, u16 sy, u16 ex, u16 ey)
{
    //bsplcd_address();
}

void drv_ili9341_scan_dir(DevLcd *lcd, u8 scan_dir)
{

}

void drv_ili9341_lcd_bl(DevLcd *lcd, u8 sta)
{
    if(sta)
    {
        LCD_BLK_ENABLE();
    }
    else
    {
        LCD_BLK_DISABLE();
    }
}

/* LCD驱动实例 */
_lcd_drv TFTLCD_ILI9341Drv = 
{
    .id = 0x9341,
    .init = drv_ili9341_init,
    .draw_point = drv_ili9341_drawpoint,
    .color_fill = drv_ili9341_color_fill,
    .fill = drv_ili9341_fill,
    .onoff = drv_ili9341_display_onoff,
    .prepare_display = drv_ili9341_prepare_display,
    .set_dir = drv_ili9341_scan_dir,
    .backlight = drv_ili9341_lcd_bl
};



